﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <head>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
        <meta content="history" name="save">
        <title>SA1643: DestructorSummaryDocumentationMustBeginWithStandardText</title>
        <link rel="stylesheet" type="text/css" href="stylesheets/helpstudio.css">
        <link rel="stylesheet" type="text/css" href="styles/Presentation.css">
        <script src="script/helpstudio.js" type="text/javascript"></script>
        <script src="script/StandardText.js" type="text/jscript"></script>
    </head>
    <body id="hsbody">
        <input type="hidden" id="userDataCache" class="userDataStyle" name="userDataCache" />
        <div id="allHistory" class="saveHistory" onsave="saveScrollPosition()" onload="loadScrollPosition()"></div>
        <script type="text/jscript">WritePageTop(document.title);</script>
        <div id="pagebody">
            <div id="mainbody">
                <table>
                    <col />
                    <tr><td><p>TypeName</p></td><td><p>DestructorSummaryDocumentationMustBeginWithStandardText</p></td></tr>
                    <tr><td><p>CheckId</p></td><td><p>SA1643</p></td></tr>
                    <tr><td><p>Category</p></td><td><p>Documentation Rules</p></td></tr>
                </table>           
                <h2>Cause</h2>
                <P>The Xml documentation header for a C# finalizer does not contain the appropriate summary text.</P>
                <H2>Rule Description</H2>
                <P>C# syntax provides a mechanism for inserting documentation for classes and elements directly into the code, through the use of Xml documentation headers. For an introduction to these headers and a description of the header syntax, see the following article: <A href="http://msdn.microsoft.com/en-us/magazine/cc302121.aspx">http://msdn.microsoft.com/en-us/magazine/cc302121.aspx</A>.</P>
                <P>A violation of this rule occurs when the summary tag within the documentation header for a finalizer does not begin with the proper text.</P>
                <P>The rule is intended to standardize the summary text for a finalizer. The summary for a finalizer must begin with “Finalizes an instance of the {class name} class.” For example, the following shows the finalizer for the Customer class.</P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> </SPAN><SPAN style="COLOR: gray">&lt;summary&gt;<o:p></o:p></SPAN></SPAN></P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> Finalizes an instance of the Customer class.<o:p></o:p></SPAN></SPAN></P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> </SPAN><SPAN style="COLOR: gray">&lt;/summary&gt;<o:p></o:p></SPAN></SPAN></P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">~</SPAN>Customer()<o:p></o:p></SPAN></P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
                <P />
                <P>It is possible to embed other tags into the summary text. For example:</P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> </SPAN><SPAN style="COLOR: gray">&lt;summary&gt;<o:p></o:p></SPAN></SPAN></P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> Finalizes an instance of the </SPAN><SPAN style="COLOR: gray">&lt;see cref="Customer"/&gt;</SPAN><SPAN style="COLOR: green"> class.<o:p></o:p></SPAN></SPAN></P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">///</SPAN><SPAN style="COLOR: green"> </SPAN><SPAN style="COLOR: gray">&lt;/summary&gt;<o:p></o:p></SPAN></SPAN></P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">~</SPAN>Customer()<o:p></o:p></SPAN></P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
                <P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; mso-vertical-align-alt: auto; mso-layout-grid-align: none" class=MsoNormal><SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-no-proof: yes" lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}</SPAN></P>
                <P />
                </o:p></SPAN>
                <H2>How to Fix Violations</H2>
                <P>To fix a violation of this rule, edit the summary text for the finalizer as described above.</P>
                <h2>How to Suppress Violations</h2>
                <pre>[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1643:DestructorSummaryDocumentationMustBeginWithStandardText", Justification = "Reviewed.")]</pre>
            </div>
            <script type="text/jscript">WritePageFooter();</script>   
        </div>
    </body>
</html>